import { createStore } from "vuex";
// 状态
let state = {
  isLogin: false,
};
// 计算属性
let getters = {
  LogState(state) {
    return state.isLogin;
  },
};
// 管理、提交mutations
let actions = {
  SHOWPROFILE({ commit }) {
    commit("SHOWPROFILE");
  },
  HIDEPROFILE({ commit }) {
    commit("HIDEPROFILE");
  },
};
let mutations = {
  SHOWPROFILE(state) {
    state.LogState = true;
  },
  HIDEPROFILE(state) {
    state.LogState = false;
  },
};
let store = createStore({
  state,
  getters,
  actions,
  mutations,
});

export default store;
